package cn.slt.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.slt.domian.MD_ClassDSID;
import cn.slt.mapper.MD_ClassDSIDMapper;
import cn.slt.mapper.MD_MetadataMapper;
import cn.slt.service.MD_classDSIDService;

@Service
@Transactional
public class MD_classDSIDServiceImpl implements MD_classDSIDService{

	@Autowired
	private MD_ClassDSIDMapper mapper;
	
	public boolean addClassBatch(List<MD_ClassDSID> list){
		return true;
	}
	public boolean addclass(MD_ClassDSID obj){
		return true;
	}
	public boolean updateclass(MD_ClassDSID obj){
		return mapper.updateclass(obj);
	}
	public Integer getdsCode(String name){
		return mapper.getdsCode(name);
	}
	public List<MD_ClassDSID> getallbysupdscodeandlevel(Integer supdscode){
		return mapper.getallbysupdscodeandlevel(supdscode);
	}
	public boolean updateLevelCode(Integer dsCode, String levelCode) {
		// TODO Auto-generated method stub
		Map<String ,Object> map=new HashMap<String ,Object>();
		
		map.put("levelCode", levelCode);
		map.put("dsCode", dsCode);
		return mapper.updateLevelCode(map);
	}
	public List<MD_ClassDSID> getBySupdscode(int supdscode){
		return mapper.getBySupdscode(supdscode);
	}
	@Override
	public List<MD_ClassDSID> getBySupdscodeandthirdlevel(MD_ClassDSID mDsid) {
		// TODO Auto-generated method stub
		return mapper.getBySupdscodeandthirdlevel(mDsid);
	}
	@Override
	public MD_ClassDSID getBydscode(Integer dscode) {
		// TODO Auto-generated method stub
		return mapper.getBydscode(dscode);
	}
	@Override
	public boolean deleteClass(int supdscode) {
		// TODO Auto-generated method stub
		return mapper.deleteClass(supdscode);
	}
	@Override
	public List<MD_ClassDSID> getEveryone() {
		// TODO Auto-generated method stub
		return mapper.getEveryone();
	}

}
